package org.example.service;

import org.example.domain.po.ErpMenu;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
* @author DELL
* @description 针对表【erp_menu(功能模块表)】的数据库操作Service
* @createDate 2024-10-11 10:34:47
*/
public interface ErpMenuService extends IService<ErpMenu> {
    
    
    /**
     * 管理员使用的树形菜单
     */
    List<ErpMenu> findMenusAdminTree(Integer parentId, String cname);
    
    /**
     * 根据用户ID查询菜单
     * @param userId 用户ID
     * @param parentId 菜单ID
     */
    List<ErpMenu> findMenuByUserIdTree(Long userId, Long parentId);
    
    
    
    /**
     * 管理员查询菜单功能(无树形)
     */
    List<ErpMenu> findMenusAdmin();
    
    /**
     * 根据用户ID查询菜单功能
     * @param userId 用户ID
     */
    List<ErpMenu> findMenusByUserId(Long userId);
    
    List<ErpMenu> getMenusByUserId(Long userId);
    
    List<ErpMenu> findMenusRoleId(Long roleId, Long tenantId);
    
    List<ErpMenu> queryMenuByParentId(Long menuId);
}
